import request from '@/http/request'
export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data,
  })
}



export function register(data) {
  return request({
    url: '/user/register',
    method: 'post',
    data
  })
}

export function getUserUpdate(data) {
  return request({
    url: '/user/update',
    method: 'put',
    data
  })
}

export function getMyPayLoad(data) {
  return request({
    url: '/user/getMyPayLoad',
    method: 'get',
    data
  })
}

export function paymentBeans(data) {
  return request({
    url: '/user/paymentBeans',
    method: 'post',
    data
  })
}

export function passPay(data) {
  return request({
    url: '/user/passPay',
    method: 'post',
    data
  })
}

export function queryPay(data) {
  return request({
    url: '/user/queryPay',
    method: 'post',
    data
  })
}

export function queryUser(data) {
  return request({
    url: '/user/queryUser',
    method: 'post',
    data
  })
}

export function passUserStatus(data) {
  return request({
    url: '/user/passUserStatus',
    method: 'post',
    data
  })
}
export function addUserContribute(data) {
  return request({
    url: '/user/addUserContribute',
    method: 'post',
    data
  })
}
export function queryUserContribute(data) {
  return request({
    url: '/user/queryUserContribute',
    method: 'post',
    data
  })
}

export function queryAnswer(data) {
  return request({
    url: '/user/queryAnswer',
    method: 'post',
    data
  })
}


export function getUserMessage(data) {
  return request({
    url: `/user/getMessage?type=${data.type}&otherId=${data.otherId}`,
    method: 'get',
  })
}


export function getUserMessageList(data) {
  return request({
    url: '/user/getMessageList',
    method: 'get',
  })
}

//消息已读
export function getUserMessageRead(data) {
  return request({
    url: `/user/readMessage`,
    method: 'post',
    data
  })
}

